package sg.edu.nus.iss.team4ft.ui;
////Author : DINH NGOC TUAN VU
//package sg.edu.nus.iss.team4ft.ui.account;
//
//import java.awt.*;
//
//import java.awt.List;
//
//import java.awt.event.ItemEvent;
//import java.awt.event.ItemListener;
//import java.text.DateFormat;
//import java.text.ParseException;
//import java.text.SimpleDateFormat;
//import java.util.*;
//
//import javax.swing.JLabel;
//
//import sg.edu.nus.iss.team4ft.accountsystem.exception.InvalidOperationException;
//import sg.edu.nus.iss.team4ft.accountsystem.services.feature.Feature;
//import sg.edu.nus.iss.team4ft.accountsystem.services.feature.FeatureCode;
//import sg.edu.nus.iss.team4ft.accountsystem.services.plan.Plan;
//import sg.edu.nus.iss.team4ft.accountsystem.services.plan.PlanCode;
//import sg.edu.nus.iss.team4ft.util.*;
//
//public class AddPlanFeatureDialog extends OkCancelDialog{
//	
//	/**
//	 * 
//	 */
//	private static final long serialVersionUID = 1L;
//	
//	private AccountApplication accountManager;
//	
//	/*Integer iCableTV1,iCableTV2,iCableTV3;
//	Integer iDVoice1, iDVoice2, iDVoice3;
//	Integer iMVoice1, iMVoice2, iMVoice3;
//	
//	Checkbox cbCableTV, cbDVoice, cbMVoice;
//	
//	Choice startDayCableTV, startMonthCableTV, startYearCableTV;
//	
//	Choice endDayCableTV, endMonthCableTV, endYearCableTV;
//	
//	Choice startDayDVoice, startMonthDVoice, startYearDVoice;
//	
//	Choice endDayDVoice, endMonthDVoice, endYearDVoice;
//	
//	Choice startDayMVoice, startMonthMVoice, startYearMVoice;
//	
//	Choice endDayMVoice, endMonthMVoice, endYearMVoice;
//	
//	Checkbox cbDLocalCall, cbDIDDCall, cbCallTransfer;
//	
//	Checkbox cbMLocalCall, cbMIDDCall, cbMDataService, cbMRoamingCall;
//	
//	private Checkbox channel1;	
//	private Checkbox channel2;
//	private Checkbox channel3;
//	private Checkbox channel4;
//	private Checkbox channel5;
//	private Checkbox channel6;
//	private Checkbox channel7;
//	private Checkbox channel8;
//	private Checkbox channel9;
//	private Checkbox channel10;*/
//	
//	PlanControl dv, mv, ct;
//	
//	public AddPlanFeatureDialog(AccountApplication accountManager) {		
//		super(accountManager.getMainWindow(),"Plan Management System");		
//		this.accountManager = accountManager;		
//	}
//	
//	protected Panel createFormPanel() {
//		Panel panel = new Panel();
//		panel.setLayout(new GridLayout(0,1));
//		
//		//dv = new PlanControl(PlanCode.DigitalVoice, Mode.New);
//		//mv = new PlanControl(PlanCode.MobileVoice, Mode.New);
//		//ct = new PlanControl(PlanCode.CableTV, Mode.New);
//		//dv.setVisible(true);
//		//mv.setVisible(true);
//		//ct.setVisible(true);
//		//panel.add(dv);
//		//panel.add(mv);
//		//panel.add(ct);
//		return panel;
//	}
//	
//	@SuppressWarnings("deprecation")
//	/*protected Panel createFormPanel1() {
//			
//		Panel panel = new Panel();
//		panel.setLayout(new GridLayout(0,1));
//		
//		Panel pCableTV = new Panel();		
//		pCableTV.setLayout(new FlowLayout(FlowLayout.LEFT));
//		
//		Panel pDVoice = new Panel();		
//		pDVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
//		
//		Panel pMVoice = new Panel();
//		pMVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
//		
//		Panel name1 = new Panel();	
//		name1.setLayout(new GridLayout(0,1));
//		
//		Panel pName1 = new Panel();
//		pName1.setLayout(new FlowLayout(FlowLayout.LEFT));		
//		cbCableTV = new Checkbox("Cable TV");
//		pName1.add(cbCableTV);
//		
//		Panel pStartDate = new Panel();
//		pStartDate.setLayout(new FlowLayout(FlowLayout.LEFT));		
//		startDayCableTV = new Choice();
//		startDayCableTV.addItem(" ");
//		for(Integer i = 1; i < 32; i++){
//			startDayCableTV.addItem(i.toString());
//		}
//		ItemListener s1 = new ItemListener(){
//			public void itemStateChanged(ItemEvent e){
//				iCableTV1 = startDayCableTV.getSelectedIndex();
//			}
//		};
//		startDayCableTV.addItemListener(s1);
//		
//		startMonthCableTV = new Choice();
//		String[] months = {"January","February","March","April","May","June","July","August","September","October","November","December"};
//		startMonthCableTV.addItem(" ");
//		for(Integer i = 0; i < months.length; i++){
//			startMonthCableTV.addItem(months[i]);
//		}
//		ItemListener s2 = new ItemListener(){
//			public void itemStateChanged(ItemEvent e){
//				iCableTV2 = startDayCableTV.getSelectedIndex();
//			}
//		};
//		startDayCableTV.addItemListener(s2);
//		
//		startYearCableTV = new Choice();
//		startYearCableTV.addItem(" ");
//		for(Integer i = 2000; i < 2101; i++){
//			startYearCableTV.addItem(i.toString());
//		}
//		ItemListener s3 = new ItemListener(){
//			public void itemStateChanged(ItemEvent e){
//				iCableTV3 = startDayCableTV.getSelectedIndex();
//			}
//		};
//		startDayCableTV.addItemListener(s3);
//		
//		pStartDate.add(new JLabel("Date of Commencement"));
//		pStartDate.add(startDayCableTV);
//		pStartDate.add(startMonthCableTV);
//		pStartDate.add(startYearCableTV);
//		
//		Panel pEndDate = new Panel();
//		pEndDate.setLayout(new FlowLayout(FlowLayout.LEFT));		
//		endDayCableTV = new Choice();
//		endDayCableTV.addItem(" ");
//		for(Integer i = 1; i < 32; i++){
//			endDayCableTV.addItem(i.toString());
//		}
//		
//		endMonthCableTV = new Choice();
//		endMonthCableTV.addItem(" ");
//		for(Integer i = 0; i < months.length; i++){
//			endMonthCableTV.addItem(months[i]);
//		}
//		
//		endYearCableTV = new Choice();
//		endYearCableTV.addItem(" ");
//		for(Integer i = 2000; i < 2101; i++){
//			endYearCableTV.addItem(i.toString());
//		}
//		pEndDate.add(new JLabel("Date of Termination"));
//		pEndDate.add(endDayCableTV);
//		pEndDate.add(endMonthCableTV);
//		pEndDate.add(endYearCableTV);
//		
//		Panel pChannels = new Panel();
//		pChannels.setLayout(new FlowLayout(FlowLayout.LEFT));
//		
//		channel1 = new Checkbox("Channel 1",true);
//		channel1.disable();
//		channel2 = new Checkbox("Channel 2",true);
//		channel2.disable();
//		channel3 = new Checkbox("Channel 3",true);
//		channel3.disable();		
//		channel4 = new Checkbox("Channel 4");
//		channel5 = new Checkbox("Channel 5");
//		channel6 = new Checkbox("Channel 6");
//		channel7 = new Checkbox("Channel 7");
//		channel8 = new Checkbox("Channel 8");
//		channel9 = new Checkbox("Channel 9");
//		channel10 = new Checkbox("Channel 10");
//		pChannels.add(channel1);
//		pChannels.add(channel2);
//		pChannels.add(channel3);
//		pChannels.add(channel4);
//		pChannels.add(channel5);
//		pChannels.add(channel6);
//		pChannels.add(channel7);
//		pChannels.add(channel8);
//		pChannels.add(channel9);
//		pChannels.add(channel10);
//		
//		//name1.add(pName1);
//		//Karthic
//		PlanControl dv = new PlanControl(PlanCode.DigitalVoice, Mode.New);
//		PlanControl mv = new PlanControl(PlanCode.MobileVoice, Mode.New);
//		PlanControl ct = new PlanControl(PlanCode.CableTV, Mode.New);
////		FeatureControl ic = new FeatureControl(FeatureCode.InternationCall, Mode.Edit);
////		FeatureControl rc = new FeatureControl(FeatureCode.CallTransfer, Mode.View);
////		lc.setVisible(true);
////		ic.setVisible(true);
////		rc.setVisible(true);
//		name1.setSize(1000, 1000);
//		name1.add(dv);
//		name1.add(mv);
//		name1.add(ct);
//		//name1.add(pEndDate);
//		//name1.add(pChannels);
//		
//		Panel name2 = new Panel();
//		name2.setLayout(new GridLayout(0,1));
//		
//		Panel pName2 = new Panel();
//		pName2.setLayout(new FlowLayout(FlowLayout.LEFT));
//		cbDVoice = new Checkbox("Digital Voice");
//		pName2.add(cbDVoice);
//		
//		Panel pStartDateDVoice = new Panel();
//		pStartDateDVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
//		startDayDVoice = new Choice();
//		startDayDVoice.addItem(" ");
//		for(Integer i = 1; i < 32; i++){
//			startDayDVoice.addItem(i.toString());
//		}
//		ItemListener sD1 = new ItemListener(){
//			public void itemStateChanged(ItemEvent e){
//				iDVoice1 = startDayDVoice.getSelectedIndex();
//			}
//		};
//		startDayDVoice.addItemListener(sD1);
//		
//		startMonthDVoice = new Choice();
//		startMonthDVoice.addItem(" ");
//		for(Integer i = 0; i < months.length; i++){
//			startMonthDVoice.addItem(months[i]);
//		}
//		ItemListener sD2 = new ItemListener(){
//			public void itemStateChanged(ItemEvent e){
//				iDVoice2 = startMonthDVoice.getSelectedIndex();
//			}
//		};
//		startMonthDVoice.addItemListener(sD2);
//		
//		startYearDVoice = new Choice();
//		startYearDVoice.addItem(" ");
//		for(Integer i = 2000; i < 2101; i++){
//			startYearDVoice.addItem(i.toString());
//		}
//		ItemListener sD3 = new ItemListener(){
//			public void itemStateChanged(ItemEvent e){
//				iDVoice3 = startYearDVoice.getSelectedIndex();
//			}
//		};
//		startYearDVoice.addItemListener(sD3);
//		
//		pStartDateDVoice.add(new JLabel("Date of Commencement "));
//		pStartDateDVoice.add(startDayDVoice);
//		pStartDateDVoice.add(startMonthDVoice);
//		pStartDateDVoice.add(startYearDVoice);
//		
//		Panel pEndDateDVoice = new Panel();
//		pEndDateDVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
//		endDayDVoice = new Choice();
//		endDayDVoice.addItem(" ");
//		for(Integer i = 1; i < 32; i++){
//			endDayDVoice.addItem(i.toString());
//		}
//		endMonthDVoice = new Choice();
//		endMonthDVoice.addItem(" ");
//		for(Integer i = 0; i < months.length; i++){
//			endMonthDVoice.addItem(months[i]);
//		}
//		endYearDVoice = new Choice();
//		endYearDVoice.addItem(" ");
//		for(Integer i = 2000; i < 2101; i++){
//			endYearDVoice.addItem(i.toString());
//		}
//		pEndDateDVoice.add(new JLabel("Date of Termination  "));
//		pEndDateDVoice.add(endDayDVoice);
//		pEndDateDVoice.add(endMonthDVoice);
//		pEndDateDVoice.add(endYearDVoice);
//		
//		Panel pDCalls = new Panel();
//		pDCalls.setLayout(new FlowLayout(FlowLayout.LEFT));
//		cbDLocalCall = new Checkbox("Local Call",true);
//		cbDLocalCall.disable();
//		cbDIDDCall = new Checkbox("Internation Call (IDD)");
//		cbCallTransfer = new Checkbox("Call Transfer");
//		pDCalls.add(cbDLocalCall);
//		pDCalls.add(cbDIDDCall);
//		pDCalls.add(cbCallTransfer);
//		
//		name2.add(pName2);		
//		name2.add(pStartDateDVoice);		
//		name2.add(pEndDateDVoice);
//		name2.add(pDCalls);
//		
//		pDVoice.add(name2);
//		
//		Panel name3 = new Panel();
//		name3.setLayout(new GridLayout(0,1));
//		
//		Panel pName3 = new Panel();
//		pName3.setLayout(new FlowLayout(FlowLayout.LEFT));
//		cbMVoice = new Checkbox("Mobile Voice");
//		pName3.add(cbMVoice);
//		
//		Panel pStartDateMVoice = new Panel();
//		pStartDateMVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
//		startDayMVoice = new Choice();
//		startDayMVoice.addItem(" ");
//		for(Integer i = 1; i < 32; i++){
//			startDayMVoice.addItem(i.toString());
//		}
//		ItemListener sM1 = new ItemListener(){
//			public void itemStateChanged(ItemEvent e){
//				iMVoice1 = startDayMVoice.getSelectedIndex();
//			}
//		};
//		startDayMVoice.addItemListener(sM1);
//		
//		startMonthMVoice = new Choice();
//		startMonthMVoice.addItem(" ");
//		for(Integer i = 0; i < months.length; i++){
//			startMonthMVoice.addItem(months[i]);
//		}
//		ItemListener sM2 = new ItemListener(){
//			public void itemStateChanged(ItemEvent e){
//				iMVoice2 = startMonthMVoice.getSelectedIndex();
//			}
//		};
//		startMonthMVoice.addItemListener(sM2);
//		
//		startYearMVoice = new Choice();
//		startYearMVoice.addItem(" ");
//		for(Integer i = 2000; i < 2101; i++){
//			startYearMVoice.addItem(i.toString());
//		}
//		ItemListener sM3 = new ItemListener(){
//			public void itemStateChanged(ItemEvent e){
//				iMVoice3 = startYearMVoice.getSelectedIndex();
//			}
//		};
//		startYearMVoice.addItemListener(sM3);
//		
//		pStartDateMVoice.add(new JLabel("Date of Commencement "));
//		pStartDateMVoice.add(startDayMVoice);
//		pStartDateMVoice.add(startMonthMVoice);
//		pStartDateMVoice.add(startYearMVoice);
//		
//		Panel pEndDateMVoice = new Panel();
//		pEndDateMVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
//		endDayMVoice = new Choice();
//		endDayMVoice.addItem(" ");
//		for(Integer i = 1; i < 32; i++){
//			endDayMVoice.addItem(i.toString());
//		}
//		endMonthMVoice = new Choice();
//		endMonthMVoice.addItem(" ");
//		for(Integer i = 0; i < months.length; i++){
//			endMonthMVoice.addItem(months[i]);
//		}
//		endYearMVoice = new Choice();
//		endYearMVoice.addItem(" ");
//		for(Integer i = 2000; i < 2101; i++){
//			endYearMVoice.addItem(i.toString());
//		}
//		pEndDateMVoice.add(new JLabel("Date of Termination "));
//		pEndDateMVoice.add(endDayMVoice);
//		pEndDateMVoice.add(endMonthMVoice);
//		pEndDateMVoice.add(endYearMVoice);
//		
//		Panel pMCalls = new Panel();
//		pMCalls.setLayout(new FlowLayout(FlowLayout.LEFT));
//		cbMLocalCall = new Checkbox("Local Call",true);
//		cbMLocalCall.disable();
//		cbMIDDCall = new Checkbox("Internation Call (IDD)");
//		cbMDataService = new Checkbox("Data Service");
//		cbMRoamingCall = new Checkbox("Roaming Call");
//		pMCalls.add(cbMLocalCall);
//		pMCalls.add(cbMIDDCall);
//		pMCalls.add(cbMDataService);
//		pMCalls.add(cbMRoamingCall);
//		
//		name3.add(pName3);
//		name3.add(pStartDateMVoice);
//		name3.add(pEndDateMVoice);
//		name3.add(pMCalls);
//		
//		pCableTV.add(name1);
//		pDVoice.add(name2);
//		pMVoice.add(name3);
//		
//		startDayCableTV.disable();
//		startMonthCableTV.disable();
//		startYearCableTV.disable();
//		endDayCableTV.disable();
//		endMonthCableTV.disable();
//		endYearCableTV.disable();
//		channel1.disable();
//		channel2.disable();
//		channel3.disable();
//		channel4.disable();
//		channel5.disable();
//		channel6.disable();
//		channel7.disable();
//		channel8.disable();
//		channel9.disable();
//		channel10.disable();
//		
//		startDayDVoice.disable();
//		startMonthDVoice.disable();
//		startYearDVoice.disable();
//		endDayDVoice.disable();
//		endMonthDVoice.disable();
//		endYearDVoice.disable();
//		cbDLocalCall.disable();
//		cbDIDDCall.disable();
//		cbCallTransfer.disable();
//		
//		startDayMVoice.disable();
//		startMonthMVoice.disable();
//		startYearMVoice.disable();
//		endDayMVoice.disable();
//		endMonthMVoice.disable();
//		endYearMVoice.disable();
//		cbMLocalCall.disable();
//		cbMIDDCall.disable();
//		cbMDataService.disable();
//		cbMRoamingCall.disable();
//		
//		cbCableTV.addItemListener(new CheckboxTestListener(){
//			public void itemStateChanged(ItemEvent arg0){
//				if (cbCableTV.getState() == true){
//					if(cbDVoice.getState() == false && cbMVoice.getState() == false){
//						startDayCableTV.setEnabled(isVisible());
//						startMonthCableTV.setEnabled(isVisible());
//						startYearCableTV.setEnabled(isVisible());
//						endDayCableTV.setEnabled(isVisible());
//						endMonthCableTV.setEnabled(isVisible());
//						endYearCableTV.setEnabled(isVisible());
//						channel1.setEnabled(isVisible());
//						channel2.setEnabled(isVisible());
//						channel3.setEnabled(isVisible());
//						channel4.setEnabled(isVisible());
//						channel5.setEnabled(isVisible());
//						channel6.setEnabled(isVisible());
//						channel7.setEnabled(isVisible());
//						channel8.setEnabled(isVisible());
//						channel9.setEnabled(isVisible());
//						channel10.setEnabled(isVisible());
//						
//						startDayDVoice.disable();
//						startMonthDVoice.disable();
//						startYearDVoice.disable();
//						endDayDVoice.disable();
//						endMonthDVoice.disable();
//						endYearDVoice.disable();
//						cbDLocalCall.disable();
//						cbDIDDCall.disable();
//						cbCallTransfer.disable();
//						
//						startDayMVoice.disable();
//						startMonthMVoice.disable();
//						startYearMVoice.disable();
//						endDayMVoice.disable();
//						endMonthMVoice.disable();
//						endYearMVoice.disable();
//						cbMLocalCall.disable();
//						cbMIDDCall.disable();
//						cbMDataService.disable();
//						cbMRoamingCall.disable();
//					}
//				}else{
//					startDayCableTV.disable();
//					startMonthCableTV.disable();
//					startYearCableTV.disable();
//					endDayCableTV.disable();
//					endMonthCableTV.disable();
//					endYearCableTV.disable();
//					channel1.disable();
//					channel2.disable();
//					channel3.disable();
//					channel4.disable();
//					channel5.disable();
//					channel6.disable();
//					channel7.disable();
//					channel8.disable();
//					channel9.disable();
//					channel10.disable();
//				}
//			}
//		});
//		
//		cbDVoice.addItemListener(new CheckboxTestListener(){
//			public void itemStateChanged(ItemEvent arg0){
//				if(cbDVoice.getState() == true){
//					startDayDVoice.setEnabled(isVisible());
//					startMonthDVoice.setEnabled(isVisible());
//					startYearDVoice.setEnabled(isVisible());
//					endDayDVoice.setEnabled(isVisible());
//					endMonthDVoice.setEnabled(isVisible());
//					endYearDVoice.setEnabled(isVisible());
//					cbDLocalCall.setEnabled(isVisible());
//					cbDIDDCall.setEnabled(isVisible());
//					cbCallTransfer.setEnabled(isVisible());
//					if (cbMVoice.getState() == false){
//						startDayMVoice.disable();
//						startMonthMVoice.disable();
//						startYearMVoice.disable();
//						endDayMVoice.disable();
//						endMonthMVoice.disable();
//						endYearMVoice.disable();
//						cbMLocalCall.disable();
//						cbMIDDCall.disable();
//						cbMDataService.disable();
//						cbMRoamingCall.disable();
//					}
//				}else{
//					startDayDVoice.disable();
//					startMonthDVoice.disable();
//					startYearDVoice.disable();
//					endDayDVoice.disable();
//					endMonthDVoice.disable();
//					endYearDVoice.disable();
//					cbDLocalCall.disable();
//					cbDIDDCall.disable();
//					cbCallTransfer.disable();
//					if(cbMVoice.getState() == false){
//						startDayMVoice.disable();
//						startMonthMVoice.disable();
//						startYearMVoice.disable();
//						endDayMVoice.disable();
//						endMonthMVoice.disable();
//						endYearMVoice.disable();
//						cbMLocalCall.disable();
//						cbMIDDCall.disable();
//						cbMDataService.disable();
//						cbMRoamingCall.disable();
//					}else{
//						startDayMVoice.setEnabled(isVisible());
//						startMonthMVoice.setEnabled(isVisible());
//						startYearMVoice.setEnabled(isVisible());
//						endDayMVoice.setEnabled(isVisible());
//						endMonthMVoice.setEnabled(isVisible());
//						endYearMVoice.setEnabled(isVisible());
//						cbMLocalCall.setEnabled(isVisible());
//						cbMIDDCall.setEnabled(isVisible());
//						cbMDataService.setEnabled(isVisible());
//						cbMRoamingCall.setEnabled(isVisible());
//					}
//				}
//			}
//		});
//		
//		cbMVoice.addItemListener(new CheckboxTestListener(){
//			public void itemStateChanged(ItemEvent arg0){
//				if (cbMVoice.getState() == true){
//					startDayMVoice.setEnabled(isVisible());
//					startMonthMVoice.setEnabled(isVisible());
//					startYearMVoice.setEnabled(isVisible());
//					endDayMVoice.setEnabled(isVisible());
//					endMonthMVoice.setEnabled(isVisible());
//					endYearMVoice.setEnabled(isVisible());
//					cbMLocalCall.setEnabled(isVisible());
//					cbMIDDCall.setEnabled(isVisible());
//					cbMDataService.setEnabled(isVisible());
//					cbMRoamingCall.setEnabled(isVisible());
//				}else{
//					startDayMVoice.disable();
//					startMonthMVoice.disable();
//					startYearMVoice.disable();
//					endDayMVoice.disable();
//					endMonthMVoice.disable();
//					endYearMVoice.disable();
//					cbMLocalCall.disable();
//					cbMIDDCall.disable();
//					cbMDataService.disable();
//					cbMRoamingCall.disable();
//					if(cbDVoice.getState() == true){
//						startDayDVoice.setEnabled(isVisible());
//						startMonthDVoice.setEnabled(isVisible());
//						startYearDVoice.setEnabled(isVisible());
//						endDayDVoice.setEnabled(isVisible());
//						endMonthDVoice.setEnabled(isVisible());
//						endYearDVoice.setEnabled(isVisible());
//						cbDLocalCall.setEnabled(isVisible());
//						cbDIDDCall.setEnabled(isVisible());
//						cbCallTransfer.setEnabled(isVisible());
//					}else{
//						startDayDVoice.disable();
//						startMonthDVoice.disable();
//						startYearDVoice.disable();
//						endDayDVoice.disable();
//						endMonthDVoice.disable();
//						endYearDVoice.disable();
//						cbDLocalCall.disable();
//						cbDIDDCall.disable();
//						cbCallTransfer.disable();
//					}
//				}
//			}
//		});
//		panel.add(pCableTV);
//		panel.add(pDVoice);
//		panel.add(pMVoice);
//		
//		panel.setVisible(true);
//		return panel;
//	}*/
//	
//	protected boolean performOkAction() {
//		
//		/*DateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy");
//		
//		Plan plan = null;
//		Feature feature = null;*/
//		
//		/*ArrayList<Date> listStartDates = new ArrayList<Date>();
//		ArrayList<PlanCode> listPlanCodes = new ArrayList<PlanCode>();
//		ArrayList<FeatureCode> listFeatureCodes = new ArrayList<FeatureCode>();*/
//		
//		ArrayList<Plan> listPlans = new ArrayList<Plan>();
//		ArrayList<Feature> listFeatures = new ArrayList<Feature>();
//		
//		
//		/*if (cbCableTV.getState() == true){
//			try {
//				listStartDates.add((Date)formatter.parse(startDayCableTV.getItem(iCableTV1) + "-" + startMonthCableTV.getItem(iCableTV1) + "-" + startYearCableTV.getItem(iCableTV1)));
//			} catch (ParseException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}
//			listPlanCodes.add(PlanCode.CableTV);
//			listFeatureCodes.add(FeatureCode.ChannelService);
//		}
//		
//		if(cbDVoice.getState() == true){
//			try {
//				listStartDates.add((Date)formatter.parse(startDayDVoice.getItem(iDVoice1) + "-" + startMonthDVoice.getItem(iDVoice1) + "-" + startYearDVoice.getItem(iDVoice1)));
//			} catch (ParseException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}
//			listPlanCodes.add(PlanCode.DigitalVoice);
//			
//			if (cbDLocalCall.getState() == true){
//				listFeatureCodes.add(FeatureCode.LocalCall);
//			}
//			if (cbDIDDCall.getState() == true){
//				listFeatureCodes.add(FeatureCode.InternationCall);
//			}
//			if (cbCallTransfer.getState() == true){
//				listFeatureCodes.add(FeatureCode.CallTransfer);
//			}
//		}
//		
//		if(cbMVoice.getState() == true){
//			try {
//				listStartDates.add((Date)formatter.parse(startDayMVoice.getItem(iMVoice1) + "-" + startMonthMVoice.getItem(iMVoice1) + "-" + startYearMVoice.getItem(iMVoice1)));
//			} catch (ParseException e) {
//				// TODO Auto-generated catch block
//				e.printStackTrace();
//			}
//			listPlanCodes.add(PlanCode.MobileVoice);
//			
//			if (cbMLocalCall.getState() == true){
//				listFeatureCodes.add(FeatureCode.LocalCall);
//			}
//			if (cbMIDDCall.getState() == true){
//				listFeatureCodes.add(FeatureCode.InternationCall);
//			}
//			if (cbMDataService.getState() == true){
//				listFeatureCodes.add(FeatureCode.DataService);
//			}
//			if (cbMRoamingCall.getState() == true){
//				listFeatureCodes.add(FeatureCode.RoamingCall);
//			}
//		}
//		
//		try
//		{
//			//iterate each of plan and its associated features and dates
//			for (PlanCode pc : listPlanCodes){
//				for (Date startDate : listStartDates){
//					plan = new Plan(startDate,pc);
//					for(FeatureCode fc : listFeatureCodes){				
//						feature = new Feature(startDate,fc);
//						accountManager.subscriptPlans(plan, feature);
//					}
//				}
//			}
//		}
//		catch (Exception e) {
//			// TODO: handle exception
//		}
//		
//		//clubapplication.addMember(surname.getText(), firstname.getText(), secondname.getText());*/
//		listPlans.add(dv.getPlan());
//		listPlans.add(mv.getPlan());
//		listPlans.add(ct.getPlan());
//		
//		try {
//			listFeatures = (ArrayList<Feature>) dv.getPlan().getFeatures();
//			listFeatures = (ArrayList<Feature>) mv.getPlan().getFeatures();
//			listFeatures = (ArrayList<Feature>) ct.getPlan().getFeatures();
//		} catch (CloneNotSupportedException e1) {
//			// TODO Auto-generated catch block
//			e1.printStackTrace();
//		}
//		
//		for (Plan p : listPlans){
//			for (Feature f : listFeatures){
//				try {
//					accountManager.subscriptPlans(p, f);
//				} catch (InvalidOperationException e) {
//					// TODO Auto-generated catch block
//					e.printStackTrace();
//				}
//			}
//		}
//		return true;
//	}
//}
//
//////Author : DINH NGOC TUAN VU
////package sg.edu.nus.iss.team4ft.ui.account;
////
////import java.awt.*;
////
////import java.awt.event.ItemEvent;
////import java.awt.event.ItemListener;
////import java.text.DateFormat;
////import java.text.ParseException;
////import java.text.SimpleDateFormat;
////import java.util.*;
////
////import javax.swing.JLabel;
////
////import sg.edu.nus.iss.team4ft.accountsystem.services.feature.Feature;
////import sg.edu.nus.iss.team4ft.accountsystem.services.feature.FeatureCode;
////import sg.edu.nus.iss.team4ft.accountsystem.services.plan.Plan;
////import sg.edu.nus.iss.team4ft.accountsystem.services.plan.PlanCode;
////import sg.edu.nus.iss.team4ft.util.*;
////
////public class AddPlanFeatureDialog extends OkCancelDialog{
////	
////	/**
////	 * 
////	 */
////	private static final long serialVersionUID = 1L;
////	
////	private AccountApplication accountManager;
////	
////	/*Integer iCableTV1,iCableTV2,iCableTV3;
////	Integer iDVoice1, iDVoice2, iDVoice3;
////	Integer iMVoice1, iMVoice2, iMVoice3;
////	
////	Checkbox cbCableTV, cbDVoice, cbMVoice;
////	
////	Choice startDayCableTV, startMonthCableTV, startYearCableTV;
////	
////	Choice endDayCableTV, endMonthCableTV, endYearCableTV;
////	
////	Choice startDayDVoice, startMonthDVoice, startYearDVoice;
////	
////	Choice endDayDVoice, endMonthDVoice, endYearDVoice;
////	
////	Choice startDayMVoice, startMonthMVoice, startYearMVoice;
////	
////	Choice endDayMVoice, endMonthMVoice, endYearMVoice;
////	
////	Checkbox cbDLocalCall, cbDIDDCall, cbCallTransfer;
////	
////	Checkbox cbMLocalCall, cbMIDDCall, cbMDataService, cbMRoamingCall;
////	
////	private Checkbox channel1;	
////	private Checkbox channel2;
////	private Checkbox channel3;
////	private Checkbox channel4;
////	private Checkbox channel5;
////	private Checkbox channel6;
////	private Checkbox channel7;
////	private Checkbox channel8;
////	private Checkbox channel9;
////	private Checkbox channel10;*/
////	
////	public AddPlanFeatureDialog(AccountApplication accountManager) {		
////		super(accountManager.getMainWindow(),"Plan Management System");		
////		this.accountManager = accountManager;		
////	}
////	
////	protected Panel createFormPanel() {
////		Panel panel = new Panel();
////		panel.setLayout(new GridLayout(0,1));
////		
//////		PlanControl dv = new PlanControl(PlanCode.DigitalVoice, Mode.New);
//////		PlanControl mv = new PlanControl(PlanCode.MobileVoice, Mode.New);
//////		PlanControl ct = new PlanControl(PlanCode.CableTV, Mode.New);
//////		dv.setVisible(true);
//////		mv.setVisible(true);
//////		ct.setVisible(true);
//////		panel.add(dv);
//////		panel.add(mv);
//////		panel.add(ct);
////		
////		return panel;
////	}
////	
////	@SuppressWarnings("deprecation")
////	/*protected Panel createFormPanel1() {
////			
////		Panel panel = new Panel();
////		panel.setLayout(new GridLayout(0,1));
////		
////		Panel pCableTV = new Panel();		
////		pCableTV.setLayout(new FlowLayout(FlowLayout.LEFT));
////		
////		Panel pDVoice = new Panel();		
////		pDVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
////		
////		Panel pMVoice = new Panel();
////		pMVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
////		
////		Panel name1 = new Panel();	
////		name1.setLayout(new GridLayout(0,1));
////		
////		Panel pName1 = new Panel();
////		pName1.setLayout(new FlowLayout(FlowLayout.LEFT));		
////		cbCableTV = new Checkbox("Cable TV");
////		pName1.add(cbCableTV);
////		
////		Panel pStartDate = new Panel();
////		pStartDate.setLayout(new FlowLayout(FlowLayout.LEFT));		
////		startDayCableTV = new Choice();
////		startDayCableTV.addItem(" ");
////		for(Integer i = 1; i < 32; i++){
////			startDayCableTV.addItem(i.toString());
////		}
////		ItemListener s1 = new ItemListener(){
////			public void itemStateChanged(ItemEvent e){
////				iCableTV1 = startDayCableTV.getSelectedIndex();
////			}
////		};
////		startDayCableTV.addItemListener(s1);
////		
////		startMonthCableTV = new Choice();
////		String[] months = {"January","February","March","April","May","June","July","August","September","October","November","December"};
////		startMonthCableTV.addItem(" ");
////		for(Integer i = 0; i < months.length; i++){
////			startMonthCableTV.addItem(months[i]);
////		}
////		ItemListener s2 = new ItemListener(){
////			public void itemStateChanged(ItemEvent e){
////				iCableTV2 = startDayCableTV.getSelectedIndex();
////			}
////		};
////		startDayCableTV.addItemListener(s2);
////		
////		startYearCableTV = new Choice();
////		startYearCableTV.addItem(" ");
////		for(Integer i = 2000; i < 2101; i++){
////			startYearCableTV.addItem(i.toString());
////		}
////		ItemListener s3 = new ItemListener(){
////			public void itemStateChanged(ItemEvent e){
////				iCableTV3 = startDayCableTV.getSelectedIndex();
////			}
////		};
////		startDayCableTV.addItemListener(s3);
////		
////		pStartDate.add(new JLabel("Date of Commencement"));
////		pStartDate.add(startDayCableTV);
////		pStartDate.add(startMonthCableTV);
////		pStartDate.add(startYearCableTV);
////		
////		Panel pEndDate = new Panel();
////		pEndDate.setLayout(new FlowLayout(FlowLayout.LEFT));		
////		endDayCableTV = new Choice();
////		endDayCableTV.addItem(" ");
////		for(Integer i = 1; i < 32; i++){
////			endDayCableTV.addItem(i.toString());
////		}
////		
////		endMonthCableTV = new Choice();
////		endMonthCableTV.addItem(" ");
////		for(Integer i = 0; i < months.length; i++){
////			endMonthCableTV.addItem(months[i]);
////		}
////		
////		endYearCableTV = new Choice();
////		endYearCableTV.addItem(" ");
////		for(Integer i = 2000; i < 2101; i++){
////			endYearCableTV.addItem(i.toString());
////		}
////		pEndDate.add(new JLabel("Date of Termination"));
////		pEndDate.add(endDayCableTV);
////		pEndDate.add(endMonthCableTV);
////		pEndDate.add(endYearCableTV);
////		
////		Panel pChannels = new Panel();
////		pChannels.setLayout(new FlowLayout(FlowLayout.LEFT));
////		
////		channel1 = new Checkbox("Channel 1",true);
////		channel1.disable();
////		channel2 = new Checkbox("Channel 2",true);
////		channel2.disable();
////		channel3 = new Checkbox("Channel 3",true);
////		channel3.disable();		
////		channel4 = new Checkbox("Channel 4");
////		channel5 = new Checkbox("Channel 5");
////		channel6 = new Checkbox("Channel 6");
////		channel7 = new Checkbox("Channel 7");
////		channel8 = new Checkbox("Channel 8");
////		channel9 = new Checkbox("Channel 9");
////		channel10 = new Checkbox("Channel 10");
////		pChannels.add(channel1);
////		pChannels.add(channel2);
////		pChannels.add(channel3);
////		pChannels.add(channel4);
////		pChannels.add(channel5);
////		pChannels.add(channel6);
////		pChannels.add(channel7);
////		pChannels.add(channel8);
////		pChannels.add(channel9);
////		pChannels.add(channel10);
////		
////		//name1.add(pName1);
////		//Karthic
////		PlanControl dv = new PlanControl(PlanCode.DigitalVoice, Mode.New);
////		PlanControl mv = new PlanControl(PlanCode.MobileVoice, Mode.New);
////		PlanControl ct = new PlanControl(PlanCode.CableTV, Mode.New);
//////		FeatureControl ic = new FeatureControl(FeatureCode.InternationCall, Mode.Edit);
//////		FeatureControl rc = new FeatureControl(FeatureCode.CallTransfer, Mode.View);
//////		lc.setVisible(true);
//////		ic.setVisible(true);
//////		rc.setVisible(true);
////		name1.setSize(1000, 1000);
////		name1.add(dv);
////		name1.add(mv);
////		name1.add(ct);
////		//name1.add(pEndDate);
////		//name1.add(pChannels);
////		
////		Panel name2 = new Panel();
////		name2.setLayout(new GridLayout(0,1));
////		
////		Panel pName2 = new Panel();
////		pName2.setLayout(new FlowLayout(FlowLayout.LEFT));
////		cbDVoice = new Checkbox("Digital Voice");
////		pName2.add(cbDVoice);
////		
////		Panel pStartDateDVoice = new Panel();
////		pStartDateDVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
////		startDayDVoice = new Choice();
////		startDayDVoice.addItem(" ");
////		for(Integer i = 1; i < 32; i++){
////			startDayDVoice.addItem(i.toString());
////		}
////		ItemListener sD1 = new ItemListener(){
////			public void itemStateChanged(ItemEvent e){
////				iDVoice1 = startDayDVoice.getSelectedIndex();
////			}
////		};
////		startDayDVoice.addItemListener(sD1);
////		
////		startMonthDVoice = new Choice();
////		startMonthDVoice.addItem(" ");
////		for(Integer i = 0; i < months.length; i++){
////			startMonthDVoice.addItem(months[i]);
////		}
////		ItemListener sD2 = new ItemListener(){
////			public void itemStateChanged(ItemEvent e){
////				iDVoice2 = startMonthDVoice.getSelectedIndex();
////			}
////		};
////		startMonthDVoice.addItemListener(sD2);
////		
////		startYearDVoice = new Choice();
////		startYearDVoice.addItem(" ");
////		for(Integer i = 2000; i < 2101; i++){
////			startYearDVoice.addItem(i.toString());
////		}
////		ItemListener sD3 = new ItemListener(){
////			public void itemStateChanged(ItemEvent e){
////				iDVoice3 = startYearDVoice.getSelectedIndex();
////			}
////		};
////		startYearDVoice.addItemListener(sD3);
////		
////		pStartDateDVoice.add(new JLabel("Date of Commencement "));
////		pStartDateDVoice.add(startDayDVoice);
////		pStartDateDVoice.add(startMonthDVoice);
////		pStartDateDVoice.add(startYearDVoice);
////		
////		Panel pEndDateDVoice = new Panel();
////		pEndDateDVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
////		endDayDVoice = new Choice();
////		endDayDVoice.addItem(" ");
////		for(Integer i = 1; i < 32; i++){
////			endDayDVoice.addItem(i.toString());
////		}
////		endMonthDVoice = new Choice();
////		endMonthDVoice.addItem(" ");
////		for(Integer i = 0; i < months.length; i++){
////			endMonthDVoice.addItem(months[i]);
////		}
////		endYearDVoice = new Choice();
////		endYearDVoice.addItem(" ");
////		for(Integer i = 2000; i < 2101; i++){
////			endYearDVoice.addItem(i.toString());
////		}
////		pEndDateDVoice.add(new JLabel("Date of Termination  "));
////		pEndDateDVoice.add(endDayDVoice);
////		pEndDateDVoice.add(endMonthDVoice);
////		pEndDateDVoice.add(endYearDVoice);
////		
////		Panel pDCalls = new Panel();
////		pDCalls.setLayout(new FlowLayout(FlowLayout.LEFT));
////		cbDLocalCall = new Checkbox("Local Call",true);
////		cbDLocalCall.disable();
////		cbDIDDCall = new Checkbox("Internation Call (IDD)");
////		cbCallTransfer = new Checkbox("Call Transfer");
////		pDCalls.add(cbDLocalCall);
////		pDCalls.add(cbDIDDCall);
////		pDCalls.add(cbCallTransfer);
////		
////		name2.add(pName2);		
////		name2.add(pStartDateDVoice);		
////		name2.add(pEndDateDVoice);
////		name2.add(pDCalls);
////		
////		pDVoice.add(name2);
////		
////		Panel name3 = new Panel();
////		name3.setLayout(new GridLayout(0,1));
////		
////		Panel pName3 = new Panel();
////		pName3.setLayout(new FlowLayout(FlowLayout.LEFT));
////		cbMVoice = new Checkbox("Mobile Voice");
////		pName3.add(cbMVoice);
////		
////		Panel pStartDateMVoice = new Panel();
////		pStartDateMVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
////		startDayMVoice = new Choice();
////		startDayMVoice.addItem(" ");
////		for(Integer i = 1; i < 32; i++){
////			startDayMVoice.addItem(i.toString());
////		}
////		ItemListener sM1 = new ItemListener(){
////			public void itemStateChanged(ItemEvent e){
////				iMVoice1 = startDayMVoice.getSelectedIndex();
////			}
////		};
////		startDayMVoice.addItemListener(sM1);
////		
////		startMonthMVoice = new Choice();
////		startMonthMVoice.addItem(" ");
////		for(Integer i = 0; i < months.length; i++){
////			startMonthMVoice.addItem(months[i]);
////		}
////		ItemListener sM2 = new ItemListener(){
////			public void itemStateChanged(ItemEvent e){
////				iMVoice2 = startMonthMVoice.getSelectedIndex();
////			}
////		};
////		startMonthMVoice.addItemListener(sM2);
////		
////		startYearMVoice = new Choice();
////		startYearMVoice.addItem(" ");
////		for(Integer i = 2000; i < 2101; i++){
////			startYearMVoice.addItem(i.toString());
////		}
////		ItemListener sM3 = new ItemListener(){
////			public void itemStateChanged(ItemEvent e){
////				iMVoice3 = startYearMVoice.getSelectedIndex();
////			}
////		};
////		startYearMVoice.addItemListener(sM3);
////		
////		pStartDateMVoice.add(new JLabel("Date of Commencement "));
////		pStartDateMVoice.add(startDayMVoice);
////		pStartDateMVoice.add(startMonthMVoice);
////		pStartDateMVoice.add(startYearMVoice);
////		
////		Panel pEndDateMVoice = new Panel();
////		pEndDateMVoice.setLayout(new FlowLayout(FlowLayout.LEFT));
////		endDayMVoice = new Choice();
////		endDayMVoice.addItem(" ");
////		for(Integer i = 1; i < 32; i++){
////			endDayMVoice.addItem(i.toString());
////		}
////		endMonthMVoice = new Choice();
////		endMonthMVoice.addItem(" ");
////		for(Integer i = 0; i < months.length; i++){
////			endMonthMVoice.addItem(months[i]);
////		}
////		endYearMVoice = new Choice();
////		endYearMVoice.addItem(" ");
////		for(Integer i = 2000; i < 2101; i++){
////			endYearMVoice.addItem(i.toString());
////		}
////		pEndDateMVoice.add(new JLabel("Date of Termination "));
////		pEndDateMVoice.add(endDayMVoice);
////		pEndDateMVoice.add(endMonthMVoice);
////		pEndDateMVoice.add(endYearMVoice);
////		
////		Panel pMCalls = new Panel();
////		pMCalls.setLayout(new FlowLayout(FlowLayout.LEFT));
////		cbMLocalCall = new Checkbox("Local Call",true);
////		cbMLocalCall.disable();
////		cbMIDDCall = new Checkbox("Internation Call (IDD)");
////		cbMDataService = new Checkbox("Data Service");
////		cbMRoamingCall = new Checkbox("Roaming Call");
////		pMCalls.add(cbMLocalCall);
////		pMCalls.add(cbMIDDCall);
////		pMCalls.add(cbMDataService);
////		pMCalls.add(cbMRoamingCall);
////		
////		name3.add(pName3);
////		name3.add(pStartDateMVoice);
////		name3.add(pEndDateMVoice);
////		name3.add(pMCalls);
////		
////		pCableTV.add(name1);
////		pDVoice.add(name2);
////		pMVoice.add(name3);
////		
////		startDayCableTV.disable();
////		startMonthCableTV.disable();
////		startYearCableTV.disable();
////		endDayCableTV.disable();
////		endMonthCableTV.disable();
////		endYearCableTV.disable();
////		channel1.disable();
////		channel2.disable();
////		channel3.disable();
////		channel4.disable();
////		channel5.disable();
////		channel6.disable();
////		channel7.disable();
////		channel8.disable();
////		channel9.disable();
////		channel10.disable();
////		
////		startDayDVoice.disable();
////		startMonthDVoice.disable();
////		startYearDVoice.disable();
////		endDayDVoice.disable();
////		endMonthDVoice.disable();
////		endYearDVoice.disable();
////		cbDLocalCall.disable();
////		cbDIDDCall.disable();
////		cbCallTransfer.disable();
////		
////		startDayMVoice.disable();
////		startMonthMVoice.disable();
////		startYearMVoice.disable();
////		endDayMVoice.disable();
////		endMonthMVoice.disable();
////		endYearMVoice.disable();
////		cbMLocalCall.disable();
////		cbMIDDCall.disable();
////		cbMDataService.disable();
////		cbMRoamingCall.disable();
////		
////		cbCableTV.addItemListener(new CheckboxTestListener(){
////			public void itemStateChanged(ItemEvent arg0){
////				if (cbCableTV.getState() == true){
////					if(cbDVoice.getState() == false && cbMVoice.getState() == false){
////						startDayCableTV.setEnabled(isVisible());
////						startMonthCableTV.setEnabled(isVisible());
////						startYearCableTV.setEnabled(isVisible());
////						endDayCableTV.setEnabled(isVisible());
////						endMonthCableTV.setEnabled(isVisible());
////						endYearCableTV.setEnabled(isVisible());
////						channel1.setEnabled(isVisible());
////						channel2.setEnabled(isVisible());
////						channel3.setEnabled(isVisible());
////						channel4.setEnabled(isVisible());
////						channel5.setEnabled(isVisible());
////						channel6.setEnabled(isVisible());
////						channel7.setEnabled(isVisible());
////						channel8.setEnabled(isVisible());
////						channel9.setEnabled(isVisible());
////						channel10.setEnabled(isVisible());
////						
////						startDayDVoice.disable();
////						startMonthDVoice.disable();
////						startYearDVoice.disable();
////						endDayDVoice.disable();
////						endMonthDVoice.disable();
////						endYearDVoice.disable();
////						cbDLocalCall.disable();
////						cbDIDDCall.disable();
////						cbCallTransfer.disable();
////						
////						startDayMVoice.disable();
////						startMonthMVoice.disable();
////						startYearMVoice.disable();
////						endDayMVoice.disable();
////						endMonthMVoice.disable();
////						endYearMVoice.disable();
////						cbMLocalCall.disable();
////						cbMIDDCall.disable();
////						cbMDataService.disable();
////						cbMRoamingCall.disable();
////					}
////				}else{
////					startDayCableTV.disable();
////					startMonthCableTV.disable();
////					startYearCableTV.disable();
////					endDayCableTV.disable();
////					endMonthCableTV.disable();
////					endYearCableTV.disable();
////					channel1.disable();
////					channel2.disable();
////					channel3.disable();
////					channel4.disable();
////					channel5.disable();
////					channel6.disable();
////					channel7.disable();
////					channel8.disable();
////					channel9.disable();
////					channel10.disable();
////				}
////			}
////		});
////		
////		cbDVoice.addItemListener(new CheckboxTestListener(){
////			public void itemStateChanged(ItemEvent arg0){
////				if(cbDVoice.getState() == true){
////					startDayDVoice.setEnabled(isVisible());
////					startMonthDVoice.setEnabled(isVisible());
////					startYearDVoice.setEnabled(isVisible());
////					endDayDVoice.setEnabled(isVisible());
////					endMonthDVoice.setEnabled(isVisible());
////					endYearDVoice.setEnabled(isVisible());
////					cbDLocalCall.setEnabled(isVisible());
////					cbDIDDCall.setEnabled(isVisible());
////					cbCallTransfer.setEnabled(isVisible());
////					if (cbMVoice.getState() == false){
////						startDayMVoice.disable();
////						startMonthMVoice.disable();
////						startYearMVoice.disable();
////						endDayMVoice.disable();
////						endMonthMVoice.disable();
////						endYearMVoice.disable();
////						cbMLocalCall.disable();
////						cbMIDDCall.disable();
////						cbMDataService.disable();
////						cbMRoamingCall.disable();
////					}
////				}else{
////					startDayDVoice.disable();
////					startMonthDVoice.disable();
////					startYearDVoice.disable();
////					endDayDVoice.disable();
////					endMonthDVoice.disable();
////					endYearDVoice.disable();
////					cbDLocalCall.disable();
////					cbDIDDCall.disable();
////					cbCallTransfer.disable();
////					if(cbMVoice.getState() == false){
////						startDayMVoice.disable();
////						startMonthMVoice.disable();
////						startYearMVoice.disable();
////						endDayMVoice.disable();
////						endMonthMVoice.disable();
////						endYearMVoice.disable();
////						cbMLocalCall.disable();
////						cbMIDDCall.disable();
////						cbMDataService.disable();
////						cbMRoamingCall.disable();
////					}else{
////						startDayMVoice.setEnabled(isVisible());
////						startMonthMVoice.setEnabled(isVisible());
////						startYearMVoice.setEnabled(isVisible());
////						endDayMVoice.setEnabled(isVisible());
////						endMonthMVoice.setEnabled(isVisible());
////						endYearMVoice.setEnabled(isVisible());
////						cbMLocalCall.setEnabled(isVisible());
////						cbMIDDCall.setEnabled(isVisible());
////						cbMDataService.setEnabled(isVisible());
////						cbMRoamingCall.setEnabled(isVisible());
////					}
////				}
////			}
////		});
////		
////		cbMVoice.addItemListener(new CheckboxTestListener(){
////			public void itemStateChanged(ItemEvent arg0){
////				if (cbMVoice.getState() == true){
////					startDayMVoice.setEnabled(isVisible());
////					startMonthMVoice.setEnabled(isVisible());
////					startYearMVoice.setEnabled(isVisible());
////					endDayMVoice.setEnabled(isVisible());
////					endMonthMVoice.setEnabled(isVisible());
////					endYearMVoice.setEnabled(isVisible());
////					cbMLocalCall.setEnabled(isVisible());
////					cbMIDDCall.setEnabled(isVisible());
////					cbMDataService.setEnabled(isVisible());
////					cbMRoamingCall.setEnabled(isVisible());
////				}else{
////					startDayMVoice.disable();
////					startMonthMVoice.disable();
////					startYearMVoice.disable();
////					endDayMVoice.disable();
////					endMonthMVoice.disable();
////					endYearMVoice.disable();
////					cbMLocalCall.disable();
////					cbMIDDCall.disable();
////					cbMDataService.disable();
////					cbMRoamingCall.disable();
////					if(cbDVoice.getState() == true){
////						startDayDVoice.setEnabled(isVisible());
////						startMonthDVoice.setEnabled(isVisible());
////						startYearDVoice.setEnabled(isVisible());
////						endDayDVoice.setEnabled(isVisible());
////						endMonthDVoice.setEnabled(isVisible());
////						endYearDVoice.setEnabled(isVisible());
////						cbDLocalCall.setEnabled(isVisible());
////						cbDIDDCall.setEnabled(isVisible());
////						cbCallTransfer.setEnabled(isVisible());
////					}else{
////						startDayDVoice.disable();
////						startMonthDVoice.disable();
////						startYearDVoice.disable();
////						endDayDVoice.disable();
////						endMonthDVoice.disable();
////						endYearDVoice.disable();
////						cbDLocalCall.disable();
////						cbDIDDCall.disable();
////						cbCallTransfer.disable();
////					}
////				}
////			}
////		});
////		panel.add(pCableTV);
////		panel.add(pDVoice);
////		panel.add(pMVoice);
////		
////		panel.setVisible(true);
////		return panel;
////	}*/
////	
////	protected boolean performOkAction() {
////		
////		/*DateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy");
////		
////		Plan plan = null;
////		Feature feature = null;
////		
////		ArrayList<Date> listStartDates = new ArrayList<Date>();
////		ArrayList<PlanCode> listPlanCodes = new ArrayList<PlanCode>();
////		ArrayList<FeatureCode> listFeatureCodes = new ArrayList<FeatureCode>();
////		
////		if (cbCableTV.getState() == true){
////			try {
////				listStartDates.add((Date)formatter.parse(startDayCableTV.getItem(iCableTV1) + "-" + startMonthCableTV.getItem(iCableTV1) + "-" + startYearCableTV.getItem(iCableTV1)));
////			} catch (ParseException e) {
////				// TODO Auto-generated catch block
////				e.printStackTrace();
////			}
////			listPlanCodes.add(PlanCode.CableTV);
////			listFeatureCodes.add(FeatureCode.ChannelService);
////		}
////		
////		if(cbDVoice.getState() == true){
////			try {
////				listStartDates.add((Date)formatter.parse(startDayDVoice.getItem(iDVoice1) + "-" + startMonthDVoice.getItem(iDVoice1) + "-" + startYearDVoice.getItem(iDVoice1)));
////			} catch (ParseException e) {
////				// TODO Auto-generated catch block
////				e.printStackTrace();
////			}
////			listPlanCodes.add(PlanCode.DigitalVoice);
////			
////			if (cbDLocalCall.getState() == true){
////				listFeatureCodes.add(FeatureCode.LocalCall);
////			}
////			if (cbDIDDCall.getState() == true){
////				listFeatureCodes.add(FeatureCode.InternationCall);
////			}
////			if (cbCallTransfer.getState() == true){
////				listFeatureCodes.add(FeatureCode.CallTransfer);
////			}
////		}
////		
////		if(cbMVoice.getState() == true){
////			try {
////				listStartDates.add((Date)formatter.parse(startDayMVoice.getItem(iMVoice1) + "-" + startMonthMVoice.getItem(iMVoice1) + "-" + startYearMVoice.getItem(iMVoice1)));
////			} catch (ParseException e) {
////				// TODO Auto-generated catch block
////				e.printStackTrace();
////			}
////			listPlanCodes.add(PlanCode.MobileVoice);
////			
////			if (cbMLocalCall.getState() == true){
////				listFeatureCodes.add(FeatureCode.LocalCall);
////			}
////			if (cbMIDDCall.getState() == true){
////				listFeatureCodes.add(FeatureCode.InternationCall);
////			}
////			if (cbMDataService.getState() == true){
////				listFeatureCodes.add(FeatureCode.DataService);
////			}
////			if (cbMRoamingCall.getState() == true){
////				listFeatureCodes.add(FeatureCode.RoamingCall);
////			}
////		}
////		
////		try
////		{
////			//iterate each of plan and its associated features and dates
////			for (PlanCode pc : listPlanCodes){
////				for (Date startDate : listStartDates){
////					plan = new Plan(startDate,pc);
////					for(FeatureCode fc : listFeatureCodes){				
////						feature = new Feature(startDate,fc);
////						accountManager.subscriptPlans(plan, feature);
////					}
////				}
////			}
////		}
////		catch (Exception e) {
////			// TODO: handle exception
////		}
////		//clubapplication.addMember(surname.getText(), firstname.getText(), secondname.getText());*/
////		return true;
////	}
////}
////
